package view.components
{
	import global.Resource;
	import flash.events.Event;
	
	public class CheckButton extends Radio
	{
		public function CheckButton(x:int,y:int,id:int,onClickFunction:Function = null)
		{
			super(x,y,id,onClickFunction);
		}
		
		override protected function initState():void
		{
			offState = Resource.getImg("face_checkOff");
			onState = Resource.getImg("face_checkOn");
			addChild(offState);
			addChild(onState);
			onState.visible = false;
			
			onState.y = offState.y = 3;
			
			if (onState is TempBitmap)
			{
				onState.addEventListener(Event.COMPLETE,onOnStateComplete);
			}
		}
	}
}